package com.sino.second.struts2;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;
import com.sino.second.business.IReviewService;
import com.sino.second.model.XmReviewResults;
import com.sino.util.CreatQueryCondition;
import com.sino.util.SysParameter;

public class Review1ResultListAction extends ActionSupport {
	/**
	 * 
	 */

	private IReviewService review1ServiceImpl = null;

	private List<XmReviewResults> tblXmfsList = null;

	public List<XmReviewResults> getTblXmfsList() {
		return tblXmfsList;
	}

	public void setTblXmfsList(List<XmReviewResults> tblXmfsList) {
		this.tblXmfsList = tblXmfsList;
	}

	public void setReview1ServiceImpl(IReviewService review1ServiceImpl) {
		this.review1ServiceImpl = review1ServiceImpl;
	}

	public String resultList() {
		HttpServletRequest request = ServletActionContext.getRequest();
		CreatQueryCondition creatQueryCondition = new CreatQueryCondition();// 条件查询类
		creatQueryCondition.initializtion(request);// 初始化查询条件
		String hql = " year = " + SysParameter.CURRENT_YEAR;
		tblXmfsList = this.review1ServiceImpl
				.findReviewResultsList(creatQueryCondition.getHqlWhere());
		if (null == tblXmfsList) {
			return INPUT;
		} else {
			XmReviewResults xm = tblXmfsList.get(0);
			return SUCCESS;
		}

	}
}
